<%-- 
    Document   : TABELA_ASSOCIAR_Funcionarios
    Created on : 21/03/2012, 15:02:16
    Author     : Plínio Mos
--%>

<%@page import="br.catraca.modelo.Funcionario"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link href="Estilos/EstiloDepartamentosTabelaAssociar.css" rel="stylesheet" type="text/css" />
    </head>
    <body topmargin="0" leftmargin="0">
        <% List<Funcionario> funcionario = (List<Funcionario>) session.getAttribute("func_nulo");%>
        
        <form id="form1" name="form1" method="post" action="CatracaServlet">
        <div id="backUp">
            <% if (!funcionario.get(0).getNome().equals("nulo")) {%>
            <input style="position: fixed; left: 0px; top: 15px; left: 30px;" 
                   type="image" name="enviar_bt" src="Estilos/Imagens/concluir_bt.png" value="Submit"/>
            <input type="hidden" name="chamarControlador" id ="chamarControlador" value ="Associar">
            <h2 style="float: right; font-family:Arial, Helvetica, sans-serif; font-size:12px;">
            *Selecione as pessoas e clique em associar
            </h2>
            <% }%>
        </div>
        <br/>
        <br/>
        <br/>
        <table width="550" border="0" id="tabelaAssociarFunc" cellspacing="0">
            <tr class="cabecalhoAssociar">
                <td width="100">Matrícula</td>
                <td width="400">Nome</td>
                <td width="50">Selec</td>
            </tr>
            
            <% if (!funcionario.get(0).getNome().equals("nulo")) {%>
            <% for (int index = 0; index < funcionario.size(); index++) {%>
            <tr <%if(index%2 != 0){%> class="tblPrench" <%}%> >
                <td align="center"><%= funcionario.get(index).getMatricula()%></td>
                <td><%= funcionario.get(index).getNome()%></td>
                <td align="center"><input type="checkbox" value="<%= funcionario.get(index).getMatricula()%>" name="sel_aluno" id="sel_aluno" />
                    <label for="sel_aluno"></label></td>
            </tr>
            <% }%>
            <%} else {%>
            <tr>
                <td>
                    Vazio
                </td>
            </tr>
            <%}%>
        </table>
</form>
  </body>
</html>
